<?php
session_start();
/**
* @package		Parents@School.
* @copyright	Copyright (C) 2008 Kristof Beckers. All rights reserved.
* @Version		1.0
* @license		GNU/GPL, see LICENSE.php
**/
include ("../../include/config.php");
include ("../../include/db.php");
include ("../../include/header.php");
if(isset($_SESSION['myusername'])){
	if ($_SESSION['admin'] == "$adminid") {
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
<link rel="stylesheet" href="../../css/template_css.css" type="text/css"/> 
<title></title>
</head>

<body>
<div align="center"><img src="<?php echo "../$logo" ; ?>" /><br><br />
<a href="../index.php"/><img src="<?php echo "../$home" ; ?>" border="0"/></a>
</div>
	<div> <br><br> </div>

<p>Pas &eacute;&eacute;n van de volgende beheerders aan:</p>
<table border="0" class='moduletable-latest'>
    <tr>
    <td><?php echo "Gebruikersnaam" ; ?></td>
</tr>
</table>
  
<?php
$sql = "SELECT * FROM $tbstaff";
$result=mysql_query($sql);
while ($row = mysql_fetch_array($result)) {
   $id =  $row['ID'];  
   $username = $row['username'];
   $password = $row['password'];
?>
<table border="0" class='moduletable-latest1'>
 <tr>
    <td><?php echo "<a href='staff_edit.php?id=$id'>$username</a>"; ?></td>
  </tr>
</table>
<?php 
}
?>
<p>Voeg een nieuwe gebruiker toe:</p>
<form id="form1" name="form1" method="post" action="staffprocess.php">
  <table width="100%" border="0" class="moduletable-latest">
    <tr>
      <td>Gebruikersnaam</td>
      <td><input name="staffusername" type="text" id="staffusername" size="35" />
      <input name="staffadmin" type="hidden" id="staffadmin" value="1" /></td>
    </tr>
    <tr>
      <td>Wachtwoord</td>
      <td><input name="staffpasswd" type="password" id="staffpasswd" size="35" /></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
    <tr>
      <td><em><strong>Rechtenbeheer:</strong></em></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
<?php include_once('user-rights.php'); ?>
  </table>
  <br /><br /><br />
  <p>
    <input type="submit" name="submit" id="submit" value="Aanmaken" />
  </p>
  <p>&nbsp;</p>
</form>
<p>&nbsp;</p>
</body>
</html>
<?php 
}}
 else {
  header("location:../index.php");
  }
  ?>